<?php

use Illuminate\Database\Seeder;
use App\Models\Menus;
class MenuTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        /**
         * -------------------------------------------------
         * 系统管理
         * -------------------------------------------------
         */
        $index = new Menus;
        $index->name = "仪表盘";
        $index->icon = "fa fa-dashboard";
        $index->route = "/";
        $index->isActive = true;
        $index->parent_id =0;
        $index->save();

        $index = new Menus;
        $index->name = "主页统计";
        $index->icon = "fa fa-bar-chart";
        $index->route = "/admin/dashboard";
        $index->isActive = true;
        $index->parent_id =1;
        $index->save();
        /**
         * -------------------------------------------------
         * 数据中心
         * -------------------------------------------------
         */
        $news = new Menus;
        $news->name = "数据中心";
        $news->icon = "fa fa-database";
        $news->route = "/";
        $news->isActive = false;
        $news->parent_id =0;
        $news->save();

        $news = new Menus;
        $news->name = "新闻数据";
        $news->icon = "fa fa-dashboard";
        $news->route = "/admin/new";
        $news->isActive = false;
        $news->parent_id =3;
        $news->save();

        /**
         * -------------------------------------------------
         * 菜单管理
         * -------------------------------------------------
         */
        $menu = new Menus;
        $menu->name = "管理菜单";
        $menu->icon = "fa fa-database";
        $menu->route = "/";
        $menu->isActive = false;
        $menu->parent_id =0;
        $menu->save();

        $menu = new Menus;
        $menu->name = "菜单中心";
        $menu->icon = "fa fa-database";
        $menu->route = "/admin/menu";
        $menu->isActive = false;
        $menu->parent_id =5;
        $menu->save();
    }
}
